\(\int \frac {(d+e x^2)^2 (a+b \log (c x^n))}{x^4} \, dx\) [193]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 82 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {b d^2 n}{9 x^3}-\frac {2 b d e n}{x}-b e^2 n x-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-1/9*b*d^2*n/x^3-2*b*d*e*n/x-b*e^2*n*x-1/3*d^2*(a+b*ln(c*x^n))/x^3-2*d*e*(a+b*ln(c*x^n))/x+e^2*x*(a+b*ln(c*x^n
))

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {276, 2372} \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )-\frac {b d^2 n}{9 x^3}-\frac {2 b d e n}{x}-b e^2 n x \]

[In]

Int[((d + e*x^2)^2*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-1/9*(b*d^2*n)/x^3 - (2*b*d*e*n)/x - b*e^2*n*x - (d^2*(a + b*Log[c*x^n]))/(3*x^3) - (2*d*e*(a + b*Log[c*x^n]))
/x + e^2*x*(a + b*Log[c*x^n])

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (e^2-\frac {d^2}{3 x^4}-\frac {2 d e}{x^2}\right ) \, dx \\ & = -\frac {b d^2 n}{9 x^3}-\frac {2 b d e n}{x}-b e^2 n x-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e \left (a+b \log \left (c x^n\right )\right )}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.98 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {3 a \left (d^2+6 d e x^2-3 e^2 x^4\right )+b n \left (d^2+18 d e x^2+9 e^2 x^4\right )+3 b \left (d^2+6 d e x^2-3 e^2 x^4\right ) \log \left (c x^n\right )}{9 x^3} \]

[In]

Integrate[((d + e*x^2)^2*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-1/9*(3*a*(d^2 + 6*d*e*x^2 - 3*e^2*x^4) + b*n*(d^2 + 18*d*e*x^2 + 9*e^2*x^4) + 3*b*(d^2 + 6*d*e*x^2 - 3*e^2*x^
4)*Log[c*x^n])/x^3

Maple [A] (verified)

Time = 0.47 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.17

method result size
parallelrisch \(-\frac {-9 x^{4} b \ln \left (c \,x^{n}\right ) e^{2}+9 b \,e^{2} n \,x^{4}-9 x^{4} a \,e^{2}+18 b \ln \left (c \,x^{n}\right ) d e \,x^{2}+18 b d e n \,x^{2}+18 a d e \,x^{2}+3 b \ln \left (c \,x^{n}\right ) d^{2}+b \,d^{2} n +3 a \,d^{2}}{9 x^{3}}\) \(96\)
risch \(-\frac {b \left (-3 e^{2} x^{4}+6 d e \,x^{2}+d^{2}\right ) \ln \left (x^{n}\right )}{3 x^{3}}-\frac {-9 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+9 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-9 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+9 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+3 i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-18 \ln \left (c \right ) b \,e^{2} x^{4}+18 b \,e^{2} n \,x^{4}-18 x^{4} a \,e^{2}+36 e \ln \left (c \right ) b d \,x^{2}+36 b d e n \,x^{2}+36 a d e \,x^{2}+6 d^{2} b \ln \left (c \right )+2 b \,d^{2} n +6 a \,d^{2}}{18 x^{3}}\) \(417\)

[In]

int((e*x^2+d)^2*(a+b*ln(c*x^n))/x^4,x,method=_RETURNVERBOSE)

[Out]

-1/9/x^3*(-9*x^4*b*ln(c*x^n)*e^2+9*b*e^2*n*x^4-9*x^4*a*e^2+18*b*ln(c*x^n)*d*e*x^2+18*b*d*e*n*x^2+18*a*d*e*x^2+
3*b*ln(c*x^n)*d^2+b*d^2*n+3*a*d^2)

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.34 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {9 \, {\left (b e^{2} n - a e^{2}\right )} x^{4} + b d^{2} n + 3 \, a d^{2} + 18 \, {\left (b d e n + a d e\right )} x^{2} - 3 \, {\left (3 \, b e^{2} x^{4} - 6 \, b d e x^{2} - b d^{2}\right )} \log \left (c\right ) - 3 \, {\left (3 \, b e^{2} n x^{4} - 6 \, b d e n x^{2} - b d^{2} n\right )} \log \left (x\right )}{9 \, x^{3}} \]

[In]

integrate((e*x^2+d)^2*(a+b*log(c*x^n))/x^4,x, algorithm="fricas")

[Out]

-1/9*(9*(b*e^2*n - a*e^2)*x^4 + b*d^2*n + 3*a*d^2 + 18*(b*d*e*n + a*d*e)*x^2 - 3*(3*b*e^2*x^4 - 6*b*d*e*x^2 -
b*d^2)*log(c) - 3*(3*b*e^2*n*x^4 - 6*b*d*e*n*x^2 - b*d^2*n)*log(x))/x^3

Sympy [A] (verification not implemented)

Time = 0.41 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.22 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=- \frac {a d^{2}}{3 x^{3}} - \frac {2 a d e}{x} + a e^{2} x - \frac {b d^{2} n}{9 x^{3}} - \frac {b d^{2} \log {\left (c x^{n} \right )}}{3 x^{3}} - \frac {2 b d e n}{x} - \frac {2 b d e \log {\left (c x^{n} \right )}}{x} - b e^{2} n x + b e^{2} x \log {\left (c x^{n} \right )} \]

[In]

integrate((e*x**2+d)**2*(a+b*ln(c*x**n))/x**4,x)

[Out]

-a*d**2/(3*x**3) - 2*a*d*e/x + a*e**2*x - b*d**2*n/(9*x**3) - b*d**2*log(c*x**n)/(3*x**3) - 2*b*d*e*n/x - 2*b*
d*e*log(c*x**n)/x - b*e**2*n*x + b*e**2*x*log(c*x**n)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.12 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-b e^{2} n x + b e^{2} x \log \left (c x^{n}\right ) + a e^{2} x - \frac {2 \, b d e n}{x} - \frac {2 \, b d e \log \left (c x^{n}\right )}{x} - \frac {2 \, a d e}{x} - \frac {b d^{2} n}{9 \, x^{3}} - \frac {b d^{2} \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {a d^{2}}{3 \, x^{3}} \]

[In]

integrate((e*x^2+d)^2*(a+b*log(c*x^n))/x^4,x, algorithm="maxima")

[Out]

-b*e^2*n*x + b*e^2*x*log(c*x^n) + a*e^2*x - 2*b*d*e*n/x - 2*b*d*e*log(c*x^n)/x - 2*a*d*e/x - 1/9*b*d^2*n/x^3 -
 1/3*b*d^2*log(c*x^n)/x^3 - 1/3*a*d^2/x^3

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.37 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-{\left (b e^{2} n - b e^{2} \log \left (c\right ) - a e^{2}\right )} x + \frac {1}{3} \, {\left (3 \, b e^{2} n x - \frac {6 \, b d e n x^{2} + b d^{2} n}{x^{3}}\right )} \log \left (x\right ) - \frac {18 \, b d e n x^{2} + 18 \, b d e x^{2} \log \left (c\right ) + 18 \, a d e x^{2} + b d^{2} n + 3 \, b d^{2} \log \left (c\right ) + 3 \, a d^{2}}{9 \, x^{3}} \]

[In]

integrate((e*x^2+d)^2*(a+b*log(c*x^n))/x^4,x, algorithm="giac")

[Out]

-(b*e^2*n - b*e^2*log(c) - a*e^2)*x + 1/3*(3*b*e^2*n*x - (6*b*d*e*n*x^2 + b*d^2*n)/x^3)*log(x) - 1/9*(18*b*d*e
*n*x^2 + 18*b*d*e*x^2*log(c) + 18*a*d*e*x^2 + b*d^2*n + 3*b*d^2*log(c) + 3*a*d^2)/x^3

Mupad [B] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.10 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=e^2\,x\,\left (a-b\,n\right )-\frac {x^2\,\left (6\,a\,d\,e+6\,b\,d\,e\,n\right )+a\,d^2+\frac {b\,d^2\,n}{3}}{3\,x^3}-\ln \left (c\,x^n\right )\,\left (\frac {\frac {b\,d^2}{3}+2\,b\,d\,e\,x^2+\frac {5\,b\,e^2\,x^4}{3}}{x^3}-\frac {8\,b\,e^2\,x}{3}\right ) \]

[In]

int(((d + e*x^2)^2*(a + b*log(c*x^n)))/x^4,x)

[Out]

e^2*x*(a - b*n) - (x^2*(6*a*d*e + 6*b*d*e*n) + a*d^2 + (b*d^2*n)/3)/(3*x^3) - log(c*x^n)*(((b*d^2)/3 + (5*b*e^
2*x^4)/3 + 2*b*d*e*x^2)/x^3 - (8*b*e^2*x)/3)